home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1984 January to June / Ahoy_Magazine_84-Jan-Jun_1984_Double_L.d64 / address book (.txt) next >
Commodore BASIC  |  2022-10-26  |  7KB  |  264 lines

  1. 0 rem--ahoy--mar issue--address book--prog page 39
  2. 1500 data1500,do,not,enter,data,on,this,line
  3. 1501 print"[147]":poke53281,0:poke53280,11
  4. 1505 input"what is your name";n$:goto1515
  5. 1510 input"[147]sorry, i forgot your name";n$
  6. 1515 print"[147]"spc(20-int((len(n$)+11)/2));"thank you ";n$;"."
  7. 1520 forl=1to1000:next
  8. 1525 print"[147]":poke53281,0:poke53280,11
  9. 1526 print"[158]address book <c> 1984 planet earth ltd.":print:t=0
  10. 1530 print"   list all entries"
  11. 1531 print
  12. 1532 print"   last name"
  13. 1533 printspc(25);"[146]"
  14. 1534 print"   first name"spc(10);" address  [146]"
  15. 1535 printspc(25);"     book[146]"
  16. 1536 print"   address"spc(12);"o  [215]    [215]   [146][208]"
  17. 1537 printspc(23);"[152] [146]%  [152] [146]     [146]   '[152] [146]"
  18. 1538 print"  city"spc(15);"[204]  [215]    [215]  [146]:"
  19. 1539 printspc(24);"[149] by        [149] [146]"
  20. 1540 print"  state"spc(14);"[149]  b.behling[149] [146]"
  21. 1541 printspc(24);"[149] [195][195][195][195][195][195][195][195][195][195][195][195][149] [146]"
  22. 1542 print"   zip code"spc(11);"[149]            [146]"
  23. 1543 printspc(24);"[149]      [146]"
  24. 1544 print"   phone number"spc(7);" [152][201][146]        [201][146]"
  25. 1545 print
  26. 1546 print"   exit program"
  27. 1547 print
  28. 1548 print"   enter data"
  29. 1549 print
  30. 1550 print"[153]choice?"
  31. 1592 getk$:ifk$=""then1592
  32. 1605 ifk$="l"thengosub1722
  33. 1610 ifk$="n"thengosub2000
  34. 1615 ifk$="f"thengosub7000
  35. 1620 ifk$="a"thengosub9000
  36. 1625 ifk$="c"thengosub4000
  37. 1630 ifk$="s"thengosub10000
  38. 1635 ifk$="x"thengosub6000
  39. 1640 ifk$="e"thengoto23000
  40. 1645 ifk$="z"thengosub12000
  41. 1650 ifk$="p"thengosub15000
  42. 1721 goto1525
  43. 1722 print"[147]"
  44. 1723 gosub20000
  45. 1724 ifa=1500thengoto1730
  46. 1726 gosub19000
  47. 1727 goto1722
  48. 1730 print"[147]"spc(12);"[158] end of files. [146]"
  49. 1735 forl=1to1000:next
  50. 1740 restore
  51. 1745 return
  52. 2000 input"[147]what is the last name";j$:z=len(j$)
  53. 2010 print"[147]"spc(20-int((len(n$)+11)/2));"thank you ";n$;"."
  54. 2020 forl=1to1000:next:goto2060
  55. 2030 printspc(7);"searching, please standby."
  56. 2060 gosub20000
  57. 2070 ifa=1500thengoto2140
  58. 2090 ifj$=left$(b$,z)thent=1:gosub19000
  59. 2130 print"[147]":goto2030
  60. 2140 ift=1thengoto2220
  61. 2150 print"[147]"spc(20-int((len(j$)+14+len(n$))/2));j$;" not on file "n$;"."
  62. 2160 printspc(8);"[158]                        [223]"
  63. 2170 printspc(8);" [146]hit return to continue.[158] "
  64. 2180 printspc(8);"[146][223]                    [146] "
  65. 2190 getk$:ifk$=""thengoto2190
  66. 2200 restore
  67. 2210 return
  68. 2220 print"[147]"spc(12);"[158] end of files. [146]"
  69. 2230 forl=1to1000:next
  70. 2240 restore
  71. 2250 return
  72. 4000 input"[147]what city do you want";j$:z=len(j$)
  73. 4200 print"[147]"spc(20-int((len(n$)+11)/2));"thank you ";n$;"."
  74. 4300 forl=1to1000:next:goto4500
  75. 4400 printspc(7);"searching please standby."
  76. 4500 gosub20000
  77. 4600 ifa=1500thengoto5300
  78. 5000 ifj$=left$(e$,z)thent=1:gosub19000
  79. 5200 print"[147]":goto4400
  80. 5300 ift=1thengoto5750
  81. 5350 print"[147]"spc(20-int((len(j$)+14+len(n$))/2));j$;" not on file "n$;"."
  82. 5360 printapc(8);"                        [223]"
  83. 5400 printspc(8);" [146]hit return to continue. "
  84. 5410 printspc(8);"[146][223]                    [146] "
  85. 5500 getk$:ifk$=""thengoto5500
  86. 5600 restore
  87. 5700 return
  88. 5750 print"[147]"spc(12);"[158] end of files. [146]"
  89. 5800 forl=1to1000:next
  90. 5850 restore
  91. 5900 return
  92. 6000 print"[147]"spc(5);"hit   to exit without saving."
  93. 6100 print""spc(8);"hit  to abort to menu."
  94. 6200 print""spc(8);"hit   to save listings."
  95. 6350 print""spc(5);"[158] rewind tape before saving!!![146]"
  96. 6900 getk$:ifk$=""thengoto6900
  97. 6910 ifk$="x"thenend
  98. 6920 ifk$="a"goto1525
  99. 6959 ifk$="s"thensave"address book 4:1"
  100. 6960 return
  101. 7000 input"[147]what is the first name";j$:z=len(j$)
  102. 7100 print"[147]"spc(20-int((len(n$)+11)/2));"thank you ";n$;"."
  103. 7200 forl=1to1000:next:goto7500
  104. 7300 printspc(7);"searching, please standby."
  105. 7500 gosub20000
  106. 7600 ifa=1500thengoto8300
  107. 8000 ifj$=left$(c$,z)thent=1:gosub19000
  108. 8200 print"[147]":goto7300
  109. 8300 ift=1thengoto8700
  110. 8350 print"[147]"spc)20-int((len(j$)+14+len(n$))/2));j$;" not on file "n$;"."
  111. 8360 printspc(8);"[159]                        [223]"
  112. 8400 printspc(8);" [146]hit return to continue.[159] "
  113. 8410 printspc(8);"[146][223]                    [146] "
  114. 8500 getk$:ifk$=""thengoto8500
  115. 8600 restore
  116. 8650 return
  117. 8700 print"[147]"spc(12);"[158] end of files. [146]"
  118. 8750 forl=1to1000:next
  119. 8800 restore
  120. 8850 return
  121. 9000 input"[147]what is the address";j$:z=len(j$)
  122. 9010 print"[147]"spc(20-int((len(n$)+11/2));"thank you ";n$;"."
  123. 9015 forl=1to1000:next:goto9035
  124. 9020 printspc(7);"searching, please standby"
  125. 9035 gosub20000
  126. 9040 ifa=1500thengoto9065
  127. 9045 ifj$=left$(d$,z)thent=1:gosub19000
  128. 9060 print"[147]":goto9035
  129. 9065 ift=1thengoto9100
  130. 9070 print"[147]"spc(1);j$;" not on file ";n$;"."
  131. 9073 printspc(8);"[156]                        [223]"
  132. 9075 printspc(8);"9 [146]hit return to continue.[156] "
  133. 9077 printspc(8);"[146][223]                    [146] "
  134. 9080 getk$:ifk$=""thengoto9080
  135. 9085 restore
  136. 9090 return
  137. 9100 print"[147]"spc(12);"[158] end of files. [146]"
  138. 9110 forl=1to1000:next
  139. 9120 restore
  140. 9130 return
  141. 10000 input"[147]what state do you want";j$:z=len(j$)
  142. 10010 print"[147]"spc(20-int((len(n$)+11)/2));"thank you ";n$;"."
  143. 10015 forl=1to1000:next:goto10035
  144. 10020 printspc(7);"searching, please standby."
  145. 10035 gosub20000
  146. 10040 ifa=1500thengoto10065
  147. 10045 ifj$=left$(f$,z)thent=1:gosub19000
  148. 10060 print"[147]":goto10035
  149. 10065 ift=1thengoto10095
  150. 10070 print"[147]"spc(20-int((len(j$)+14+len(n$))/2;j$;" not on file "n$;"."
  151. 10073 printspc(8);"                       [223]"
  152. 10075 printspc(8);" [146]hit return to continue. "
  153. 10077 printspc(8);"[146][223]                  [146] "
  154. 10080 getk$:ifk$=""thengoto10080
  155. 10085 restore
  156. 10090 return
  157. 10095 print"[147]"spc(12);"[158] end of files. [146]
  158. 10100 [129]l[178]1[164]1000:[130]
  159. 10105 [140]
  160. 10110 [142]
  161. 12000 [133]"loadwhat is the zip code";j$:z[178][195](j$)
  162. 12005 [153]"load"[166]20[171][181](([195](n$)[170]11)[173]2));"thank you ";n$"."
  163. 12010 [129]l[178]1[164]1000:[130]:[137]12015
  164. 12013 [153][166]7);"searching, please stankby."
  165. 12015 [141]20000
  166. 12020 [139]a[178]1500[167][137]12045
  167. 12025 [139]j$[178][200](g$,z)[167]t[178]1:[141]19000
  168. 12040 [153]"load":[137]12015
  169. 12045 [139]t[178]1[167][137]12075
  170. 12053 [153][166]8);"                        (NULL)"
  171. 12055 [153][166]8);" waithit return to continue. "
  172. 12057 [153][166]8);"wait(NULL)                 wait)"
  173. 12060 [161]k$:[139]k$[178]""[167][137]12060
  174. 12065 [140]
  175. 12070 [142]
  176. 12075 [153]"load"[166]12);"sys end of files. wait"
  177. 12080 [129]l[178]1[164]1000:[130]
  178. 12085 [140]
  179. 12090 [142]
  180. 15000 [133]"loadwhat phone number";j$:z[178][195](j$)
  181. 15005 [153]"load"[166]20[171][181](([195](n$)[170]11)[173]2));"thank you ";n$;"."
  182. 15010 [129]l[178]1[164]1000:[130]:[137]15015
  183. 15013 [153][166]7);"searching, please standby."
  184. 15015 [141]20000
  185. 15020 [139]a[178]1500[167][137]15045
  186. 15025 [139]j$[178][200](h$,z)[167]t[178]1:[141]19000
  187. 15040 [153]"load":[137]15015
  188. 15045 [139]t[178]1[167][137]15075
  189. 15053 [153][166]8);"for                        (NULL)"
  190. 15055 [153][166]8);" waithit return to continue.for "
  191. 15057 [153][166]8);"wait(NULL)                 wait "
  192. 15060 [161]k$:[139]k$[178]""[167][137]15060
  193. 15065 [140]
  194. 15070 [142]
  195. 15075 [153]"load"[166]12);"sys end of files. wait"
  196. 15080 [129]l[178]1[164]1000:[130]
  197. 15085 [140]
  198. 15090 [142]
  199. 19000 [153]"loadcontfile number  >";a
  200. 19010 [153]"open(NULL)lenlenlenlenlenlenlenlenlenlenlenlenright$"
  201. 19100 [153]"openpeekname      openpeek>";b$;", ";c$
  202. 19110 [153]"openpeek            peek"
  203. 19150 [153]"openpeekaddress   openpeek>";d$
  204. 19160 [153]"openpeek            peek"
  205. 19200 [153]"openpeekcity      openb>";e$
  206. 19210 [153]"openpeek            peek"
  207. 19300 [153]"openpeekstate     openpeek>";f$
  208. 19310 [153]"openpeek            peek"
  209. 19350 [153]"openpeekzip code  openpeek>";g$
  210. 19355 [153]"openpeek            peek"
  211. 19356 [153]"openpeekphone numberopenb>";h$
  212. 19357 [153]"openpeek            peek"
  213. 19400 [153]"sys-lenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenright$"
  214. 19410 [153]"syspeekhit   to abort to menusyspeek"
  215. 19420 [153]"syspeek                        peek"
  216. 19425 [153]"peekhit   to edit filesys    peek"
  217. 19430 [153]"peek                        peek"
  218. 19440 [153]"peekhit return to continue  syspeek"
  219. 19450 [153]"mid$lenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlenlen(NULL)"
  220. 19500 [161]k$:[139]k$[178]""[167][137]19500
  221. 19540 [139]k$[178]"x"[167][140]
  222. 19550 [139]k$[178]"x"[167][137]1525
  223. 19560 [139]k$[178]"e"[167]ed[178]1:[137]19700
  224. 19600 [142]
  225. 19700 [141]23070
  226. 19705 [139]ed[178]2[167][153]"list";a;"-";a[170]1:[137]19715
  227. 19710 [153]"list"a
  228. 19715 [153]"ononon";:[151]198,4:[129]i[178]631[164]636:[151]i,13:[130]:[128]
  229. 20000 [135]a
  230. 20100 [139]a[178]1500[167][140]
  231. 20110 [139]a[178]1500[167][142]
  232. 20115 x[178]a
  233. 20200 [135]b$,c$,d$,e$,f$,g$,h$
  234. 20300 [142]
  235. 23000 [133]"loadlast name";i1$
  236. 23010 [133]"loadfirst name";i2$
  237. 23015 [133]"loadaddress";i3$
  238. 23020 [133]"loadcity";i4$
  239. 23025 [133]"loadstate";i5$
  240. 23030 [133]"loadzip code";i6$
  241. 23035 [133]"loadphone number";i7$
  242. 23045 [153]"load";[166]10);"filing. please wait."
  243. 23050 [141]20000
  244. 23055 [139]x[177][178]1500[167][137]23120
  245. 23060 [139]a[178]1500[167][137]23070
  246. 23065 [137]23050
  247. 23070 ld[178][195](b$)[170][195](c$)[170][195](d$)[170][195](e$)[170][195](f$)[170][195](g$)[170][195](h$)[170][195]([196](a))
  248. 23075 [139]ld[177][178]67[167]x[178]x[170]1:[139]ed[178]1[167]ed[178]2:[142]
  249. 23076 [139]ed[178]1[167][142]
  250. 23080 dl[178][195](i1$)[170][195](i2$)[170][195](i3$)[170][195](i4$)[170][195](i5$)[170][195](i6$)[170][195](i7$)
  251. 23085 li[178]x[170]1:dl[178]dl[170][195]([196](li))
  252. 23090 r[178]4:[139]dl[177][178]67[167]23130
  253. 23095 [153]"load"[201]([196](li),[195]([196](li))[171]1)"data";li;"cmd,";i1$;",";i2$;
  254. 23100 [153]",";i3$;",";i4$;",";i5$;",";i6$;",";i7$
  255. 23105 [153]"run1510"
  256. 23110 [153]"";:[151]198,r:[129]i[178]631[164]635:[151]i,13:[130]:[128]
  257. 23120 [153]"load"[166]13);"memory full!!!wait":[129]l[178]1[164]2000:[130]
  258. 23125 [140]:[142]
  259. 23130 [153]"load"[201]([196](li),[195]([196](li))[171]1)"data";li;"cmd,";i1$;",";i2$;
  260. 23135 [153]",";i3$
  261. 23140 li[178]li[170]1
  262. 23145 [153][201]([196](li),[195]([196](li))[171]1)"data";i4$;",";i5$;",";i6$;",";i7$
  263. 23150 r[178]5:[137]23105
  264.